# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-themes-extra
pkgver=3.28
pkgrel=1
pkgdesc="Misc themes and theme-y tidbits"
url="https://gitlab.gnome.org/GNOME/gnome-themes-extra"
arch="all !s390x !mips !mips64" # librsvg
license="LGPL-2.1-only"
depends="ttf-cantarell librsvg adwaita-gtk2-theme"
makedepends="intltool gtk+3.0-dev gtk+2.0-dev librsvg-dev"
options="!check" # no tests
subpackages="$pkgname-lang adwaita-gtk2-theme:_gtk2"
source="https://download.gnome.org/sources/gnome-themes-extra/$pkgver/gnome-themes-extra-$pkgver.tar.xz"
replaces="gnome-themes-standard" # upstream rename
provides="gnome-themes-standard=$pkgver-r$pkgrel"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

_gtk2() {
	pkgdesc="Adwaita gtk2 theme"

	mkdir -p "$subpkgdir"/usr/share/themes/Adwaita \
		"$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/share/themes/Adwaita/gtk-2.0 \
		"$subpkgdir"/usr/share/themes/Adwaita
	mv "$pkgdir"/usr/lib/gtk-2.0 "$subpkgdir"/usr/lib
}

sha512sums="bccc446e86b12476b86a0fe2e3354500c8fb3eef62a85c3823d69aaa259e032e1f94e7993bf633397b669c425ef42635b0cf17b376f0b7cf1869bb1d7160ede0  gnome-themes-extra-3.28.tar.xz"
